set nocompatible
filetype off

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Bundle 'gmarik/vundle'
Bundle 'omnicppcomplete'

syntax on

filetype on
filetype indent on
filetype plugin on

set lines=100
set columns=240

set number
set ruler
set statusline=2
set noexpandtab
set nobackup
set noswapfile
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set smarttab
set scrolloff=7
set backspace=indent,eol,start
set hidden
set lazyredraw
set showmode
set mousehide
set wildmenu

" ctrlp
set runtimepath^=~/.vim/bundle/ctrlp.vim
map	<C-Tab> :CtrlPMixed pwd<CR> 
map <C-S-Tab> :CtrlPBuffer<CR>

set gfn=Consolas:h8
set guifont=Consolas:h8
colorscheme railscasts
set background=dark

set hlsearch
set incsearch
set ignorecase
set smartcase

map <A-left> <C-W>h
map <A-right> <C-W>l
map <A-down> <C-W>j
map <A-up> <C-W>k

map <left> :bn<CR>
map <right> :bp<CR>

set guioptions-=T   " no toolbar

au BufNewFile,BufRead,BufEnter *.cpp,*.hpp,*.h set omnifunc=omni#cpp#complete#Main
au FocusLost * :wa

set tags+=~/.vim/tags/usr_include
set tags+=~/.vim/tags/glm_tags
set tags+=~/.vim/tags/sdl_tags
set tags+=~/.vim/tags/sdl_img_tags
set tags+=~/.vim/tags/cpp_tags
map <C-F12> :"!C:\MinGW\msys\1.0\local\bin\ctags" -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .<CR>

" OmniCppComplete
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
let OmniCpp_MayCompleteDot = 1 " autocomplete after .
let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest,preview



